// test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include "MapTest.h"
#include <map>

using namespace std;

class Test;
int __stdcall Add(int a, int b);
void MapTest(map<INT32, Test>& users);

class Test {
public: 
	Test() {
		cout<<"created Test"<<endl;
	}
	~Test() {
		cout<<"removed Test"<<endl;
	}
	Test(const Test& t) {
		i = t.i;

		cout<<"called Test copy constructor"<<endl;
	}
	int i;
};
int _tmain(int argc, _TCHAR* argv[])
{
	//map<INT32, Test> users;
	//MapTest(users);

	Test t1;	
	t1.i = 1;
	Test t2 = t1;
	t2.i=3;

	cout<<t1.i<<endl;

	return 0;
}

void MapTest(map<INT32, Test>& users) {	
	Test t1;
	users[1] = t1;
}

int __stdcall Add(int a, int b)
{
     int c,d,e;
     c=a+b;
     return c;
}
